﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using System.Data.OleDb;

namespace DAO
{
    public class NguoiDungDAO
    {
        DataProvider dp;
        public NguoiDungDAO()
        {
            dp = new DataProvider();
        }

        public bool KiemTraDangNhap(NguoiDungDTO nddto)
        {
            DataTable table = new DataTable();
            string sql = "select * from NguoiDung where tendangnhap = '" + nddto.Tendangnhap + "' and matkhau = '" + nddto.Matkhau + "'";
            table = dp.LayBangDuLieu(sql);
            if (table.Rows.Count > 0)
                return true;
            return false;
        }
    }
}
